#pragma once

#include<gtest/gtest.h>

#include<galois/cont/ArrayHandle.h>
using galois::cont::ArrayHandle;

TEST(ArrayHandle, Allocate) {
  ArrayHandle<int> a;

  EXPECT_EQ(a.Length(), 0);

  a.Allocate(10);
  EXPECT_EQ(a.Length(), 10);

  a[0] = 0;
  a[1] = 1;

  EXPECT_EQ(a[0], 0);
  EXPECT_EQ(a[1], 1);
}